<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
    <title>Register</title>
    <link rel="icon" type="image/png" href="{{ url_for('static', filename='phillfinance.png') }}">
</head>
<body>
    <nav>
        <ul>
            <li><a href="{{ url_for('home') }}">Home</a></li>
            <li><a href="{{ url_for('login') }}">Login</a></li>
        </ul>
    </nav>

    <h1>Register</h1>

    <!-- Display flash messages for registration -->
    {% with messages = get_flashed_messages() %}
        {% if messages %}
            <ul class="flashes">
                {% for message in messages %}
                    <li class="flash">{{ message }}</li>
                {% endfor %}
            </ul>
        {% endif %}
    {% endwith %}

    <form method="POST">
        {{ form.hidden_tag() }}
        <div>{{ form.username.label }} {{ form.username() }}</div>
        <div>{{ form.password.label }} {{ form.password() }}</div>
        <div>{{ form.submit() }}</div>
    </form>
</body>
</html>
